let a: 'zhangsan' | 'lisi'
let b: string | number
let c: { name: string, age: number } & { name: string }
let d: { name: string, [propName: string]: any }
// 可选参数 ?:
let e: { name: string, age?: number }
let f: any = 12
f = '12'
// 默认参数
let fn1: (a1: number, b1: number) => number = function (val1: number = 1, val2: number = 2): number {
    return val1 + val2
}
// 剩余参数
let fn2: (a1: number, b1: number) => number = function (val1: number, ...left: number[]): number {
    return val1
}
let arr1: string[] = ['1']
let arr2: Array<string> = ['1']
let arr3: [string, number] = ['1', 2]

enum Gender { male = 1, female = 2}

let g = 'a' as string
let h = g
type myType = 1 | 2 | 3;
let i: myType = 1;

type myType2 = {
    name: string,
    age: number,
    [propname: string]: any;
}
const obj100: myType2 = {
    name: 'zhang',
    age: 100,
    other: 'as',
    other1: 'as',
}
// type不可以重复声明，接口可以重复声明

export {}